import { PanelDataProvider, PanelItemProvider } from '../../../interface';

/**
 * 应用菜单
 *
 * @author chitanda
 * @date 2022-02-17 15:02:43
 * @export
 * @class SysPortletProvider
 * @implements {PanelItemProvider}
 */
export class SysPortletProvider implements PanelItemProvider {
  type = 'SYSPORTLET';

  materialGroup = 'xxx';

  materialComponent = 'sys-portlet-material';

  contentComponent = 'sys-portlet-content';

  async createItem(parent: PanelDataProvider | null): Promise<PanelDataProvider> {
    console.log(parent, '新建门户部件');
    throw new Error('新建门户部件未实现');
  }

  async moveItem(
    from: PanelDataProvider<unknown>,
    to: PanelDataProvider<unknown>,
    item: PanelDataProvider<unknown>,
  ): Promise<boolean> {
    console.log(from, to, item, '移动门户部件');
    return false;
  }

  removeItem(item: PanelDataProvider<unknown>): Promise<boolean> {
    throw new Error('Method not implemented.');
  }
}
